
<div class="d-shang-15">
	<div class="d-kuan  d-yuanjiao-10 d-quxian-0 ">
		{php $tu=[];}
		{loop $shangpintu $i $c}
		    {php $tu[] = dr_get_file($c.file);}
		{/loop}
			<div class=" ">
				<div class="row">
				<div class="col-md-5 col-xs-12">
					<div class="swiper mySwiper">
					  <div class="swiper-wrapper">
						{loop $shangpintu $i $c}
						<div class="swiper-slide">
							<a>
							<img src="{dr_get_file($c.file)}" style="width:100%;border-radius: 10px;" />
							</a>
						</div>
						{/loop}
					  </div>
					  <div class="swiper-pagination"></div>
					</div>
					<script src="{THEME_PATH}assets/js/swiper-bundle.min.js" type="text/javascript"></script>
					<!-- Initialize Swiper -->
						<script>
						  var swiper = new Swiper(".mySwiper", {
							pagination: {
							  el: ".swiper-pagination",
							},
							loop: true, // 循环模式选项true
							autoplay : { delay:5000}, // 时间
							speed : 1000, // 速度
						  });
						</script>
				</div>
				<div class="col-md-7 col-xs-12 ">
					<div class="d-wenzi-16 d-jiacu d-shang-10">
						<span class="d-yincang">
					        <span class=" ">{dr_strcut(dr_clearhtml($title), 20)}</span>
						</span>
						<span class="d-yincang-pc d-chaochu">
						    <span class="pull-left ">{dr_strcut(dr_clearhtml($title), 12)}</span>
						</span>
						
						<div class="d-clear"></div>
					</div>
					<div class="d-yincang-pc">
						<div class=" d-kuan d-shang-10 d-wenzi-14 d-chaochu-2">
							{dr_strcut(dr_clearhtml($neirong), 40)}
						</div>
					</div>
					<div class="d-yincang">
						<div class=" d-kuan d-shang-10 d-wenzi-14">
							{dr_strcut(dr_clearhtml($neirong), 100)}
						</div>
					</div>
					<div class="d-wenzi-16  d-shang-10">
						
						<div class="d-wenzi-16 pull-left  d-zitiyanse-hongse">{$price} 元</div>
						{if $price_quantity - $goumailiang ==0}
						{else}
						<span class="pull-right d-wenzi-12 pull-right d-biaoqian-30 d-yuanjiao-5">
							<a href="javascript:add_jiance();" >去购买 <i class="iconm fa fa-angle-right"></i></a>
						</span>
						{/if}
						<div class="d-clear"></div>
					</div>
					<div class="d-shang-10">
						
						<div class=" pull-left  d-wenzi-12">数量：
						{if $price_quantity - $goumailiang ==0}
						<span class="pull-right d-wenzi-12 pull-right d-biaoqian-30 d-yuanjiao-5">
							已售罄 
						</span>
						{else}
							{$price_quantity - $goumailiang} 
							
							{if $shipping_param['param'] ==1}
							件
							{elseif $shipping_param['param'] ==2}
							千克
							{elseif $shipping_param['param'] ==3}
							立方
							{elseif $shipping_param['param'] ==4}
							台
							{/if}
						{/if}
						</div>
						<span class="pull-right d-wenzi-12 pull-right  d-yuanjiao-5">
							<a href="javascript:add_jiance();" >已购  {$goumailiang}
							{if $shipping_param['param'] ==1}
						件
						{elseif $shipping_param['param'] ==2}
						千克
						{elseif $shipping_param['param'] ==3}
						立方
						{elseif $shipping_param['param'] ==4}
						台
						{/if}</a>
						</span>
						
						<div class="d-clear"></div>
					</div>
					
					<div class=" d-shang-10">
						
						<div class="pull-left d-wenzi-12">编号：{$price_sn} </div>
						<span class="pull-right d-wenzi-12 pull-right  d-yuanjiao-5">
							{if $uid == $member.id}
							<a href="javascript:todingdan();" >查看订单</a>
							{else} 
							<a href="javascript:dingdan();" >查看订单</a>
							{/if}
						</span>
						
						<div class="d-clear"></div>
					</div>
					<div class=" d-shang-10">
						
						<div class="pull-left d-wenzi-12">属性：
						 {if $spxingzhi==0}
						 实物
						 {elseif $spxingzhi==1}
						 服务
						 {elseif $spxingzhi==2}
						 虚拟
						 {/if}
						 </div>
						<div class="d-clear"></div>
					</div>
					<div class="d-clear"></div>
				</div>
				</div>
				<div class="d-clear"></div>
			</div>
	</div>
</div>
<div class="d-shang-15">
	<div class="d-kuan  d-yuanjiao-10 d-quxian-0 ">
		<table class="table table-striped">
		      <thead>
		        <tr>
		          <th style="width: 80px;">参数名称</th>
		          <th class="d-wenzi-yzuo">参数值</th>
		        </tr>
		      </thead>
		      <tbody>
				  {loop $spcs $i $c}
		        <tr>
		          <th scope="row">{$c['name']}</th>
		          <td>{$c['value']}</td>
		        </tr>
				 {/loop}
		        
		      </tbody>
		    </table>
	</div>
</div>
{php $shijiandata =\Phpcmf\Service::M()->db->table('1_quan_gouwu_buy')->where('cid', $id)->where('uid',$member.id)->get()->getRowArray();}
{php $ssjj=$shijiandata['yuedutianshu'];}

{if $ssjj > time()}
<div class="d-kuan d-beijing-hei-f0 d-yuanjiao-10">
	<div class="d-neikuang-10">
		<div style="color: #ff640a;" class="d-wenzi-12">有效时间：{dr_date($ssjj, "Y-m-d (H:i:s) ")} </div>
		{if $yueduneirong}
			{$yueduneirong}
		{/if}
	</div>
	
</div>
{/if}
<style>
	.d-imgs img {
		max-width: 100%;
		margin-bottom: 0px;
	}
</style>
<script type="text/javascript">
	// 购买地址
	    function add_jiance() {
	        //var url = "{dr_url('quan/shangpin/buy', ['id' => $id]}";
			var url = "/index.php?s=quan&c=shangpin&m=jiance&id={$id}";
			window.location.href = url;
	    }
		function add_buy() {
		    //var url = "{dr_url('quan/shangpin/buy', ['id' => $id]}";
			var url = "/index.php?s=quan&c=shangpin&m=buy&id={$id}";
			window.location.href = url;
		    $.get("/index.php?is_ajax=1&s=quan&c=shangpin&m=jiance&id={$id}", function(data){
		    	//dr_cmf_tips(data.code, data.msg);
		        if (data.code =="1") {
					window.location.href = url;
		            //console.log('jin', msg); 
		        }
				if (data.code =="0") {
					layer.msg(data.msg,{time:500});
				}
		    }, 'json');
		}
		function todingdan() {
		    //var url = "{dr_url('quan/shangpin/buy', ['id' => $id]}";
			var url = "/index.php?s=quan&c=shangpin&m=tomaijialisthtml&id={$id}";
			window.location.href = url;
		}
		function dingdan() {
		    //var url = "{dr_url('quan/shangpin/buy', ['id' => $id]}";
			var url = "/index.php?s=quan&c=shangpin&m=maijialisthtml&id={$id}";
			window.location.href = url;
		}
</script>